home *** CD-ROM | disk | FTP | other *** search
- Path: digex.net!not-for-mail
- From: car@access4.digex.net (Mr. Blue)
- Newsgroups: comp.lang.c++
- Subject: STL: Finding an object in a set of Pointers
- Date: 12 Apr 1996 09:42:14 -0400
- Organization: Express Access Online Communications, Greenbelt, MD USA
- Message-ID: <4klmjm$kul@access4.digex.net>
- NNTP-Posting-Host: access4.digex.net
-
-
- I am using an STL set to contain *pointers* to objects.
-
- Problem: I want to find out if an object I just created is
- logically contained in the set.
-
- The find() function will tell me whether the same *address*
- is already in the set, but I need to follow the pointers and
- invoke operator==() on the objects.
-
- Is there an elegant way I can do this without writing my
- own loop, de-referencing, and comparing?
-
- Chris
-
-
-